package org.acghub.mtdb.common.type;

import org.acghub.mtdb.common.Naming;
import org.acghub.mtdb.common.Type;

import java.util.Set;

/**
 * @author zhouhe
 */
public abstract class TypeBaseCollection extends Type {

    private final Type valueType;

    protected TypeBaseCollection(Naming parent, Type valueType) {
        super(parent);
        this.valueType = valueType;
    }

    @Override
    public boolean isConstType() {
        return false;
    }

    public Type getValueType() {
        return valueType;
    }

    @Override
    public void depends(Set<Type> types) {
        valueType.depends(types);
    }
}
